<div class="container-fluid">
    <div class="row">

        <!-- Earnings (Monthly) Card Example -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">日期
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">{{summaryInfo.date}}</div>
                        </div>
                        <div class="col-auto">
                            <i class="fas fa-calendar fa-2x text-gray-300"></i>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Earnings (Monthly) Card Example -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-success shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-success text-uppercase mb-1">统计人数
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">{{summaryInfo.totalUserCount}}</div>
                        </div>
                        <div class="col-auto">
                            <i class="fas fa-dollar-sign fa-2x text-gray-300"></i>

                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Earnings (Monthly) Card Example -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-info shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-info text-uppercase mb-1">打卡人数</div>
                            <div class="row no-gutters align-items-center">
                                <div class="col-auto">
                                    <div class="h5 mb-0 mr-3 font-weight-bold text-gray-800">
                                        {{summaryInfo.checkedCount}}
                                    </div>
                                </div>
                                <div class="col">
                                    <div class="progress progress-sm mr-2">
                                        <div class="progress-bar bg-info" role="progressbar"
                                             ng-style="{width: summaryInfo.checkRatio}"
                                             aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="col-auto">
                            <!--<i class="fas fa-clipboard-list fa-2x text-gray-300"></i>-->
                            <i class="fas fa-dollar-sign fa-2x text-gray-300"></i>

                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Pending Requests Card Example -->
        <div class="col-xl-3 col-md-6 mb-4">
            <div class="card border-left-warning shadow h-100 py-2">
                <div class="card-body">
                    <div class="row no-gutters align-items-center">
                        <div class="col mr-2">
                            <div class="text-xs font-weight-bold text-warning text-uppercase mb-1">打卡率
                            </div>
                            <div class="h5 mb-0 font-weight-bold text-gray-800">{{summaryInfo.checkRatio}}</div>
                        </div>
                        <div class="col-auto">
                            <!--<i class="fas fa-comments fa-2x text-gray-300"></i>-->
                            <i class="fas fa-dollar-sign fa-2x text-gray-300"></i>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <div class="row">
                <div class="col-sm-6"><h6 class="m-0 font-weight-bold text-primary">数据更新时间：{{users[0].updateTime}}</h6>
                </div>

            </div>


        </div>
        <div class="card-body">
            <div class="table-responsive">


                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                    <thead>

                    <th style="text-align: center">序号</th>
                    <th style="text-align: center">用户名</th>
                    <th style="text-align: center">头像</th>
                    <th style="text-align: center">查卡</th>

                    <th style="text-align: center">今日刷题</th>
                    <th style="text-align: center">刷题数</th>
                    <th style="text-align: center">点赞</th>
                    </tr>
                    </thead>


                    </tr>
                    </tfoot>
                    <tbody ng-repeat="user in users |orderBy :solvedProblemNumberOfToday " ng-switch={{user.checked}}>
                    <tr>

                        <td style="text-align: center">{{$index + 1}}</td>
                        <td style="text-align: center"><a href="{{user.address}}">{{user.username}} </a></td>
                        <td><a href="{{user.address}}" ng-if="$index ==0"><div style=" width:60px; height: 60px; text-align: center; padding-top: 5px; margin: 0 auto; background: linear-gradient(#feea88,#d7a807); border-radius: 55px"><img width="50px" src={{user.avatar}} style="margin: 0 auto;border-radius: 50%" alt="user avatar"></div></a>
                            <a href="{{user.address}}" ng-if="$index ==1"><div style=" width:60px; height: 60px; text-align: center; padding-top: 5px; margin: 0 auto; background: linear-gradient(white,#ababab); border-radius: 55px"><img width="50px" src={{user.avatar}} style="margin: 0 auto;border-radius: 50%" alt="user avatar"></div></a>
                            <a href="{{user.address}}" ng-if="$index ==2"><div style=" width:60px; height: 60px; text-align: center; padding-top: 5px; margin: 0 auto; background: linear-gradient(#facfa3,#d77c44); border-radius: 55px"><img width="50px" src={{user.avatar}} style="margin: 0 auto;border-radius: 50%" alt="user avatar"></div></a>
                            <a href="{{user.address}}" ng-if="$index >2"><div style="text-align: center; margin: 0 auto;"> <img width="50px" src={{user.avatar}} style="margin: 0 auto;border-radius: 50%" alt="user avatar"></div></a>

                        </td>

                        <td ng-switch-when="0" style="text-align: center">
                            <div class="text-xs font-weight-bold text-success text-uppercase mb-1" >已打卡</div>
                        </td>
                        <td ng-switch-when="1" style="text-align: center">
                            <div class="text-xs font-weight-bold text-warning text-uppercase mb-1">缺卡</div>
                        </td>

                        <td style="text-align: center">{{user.solvedProblemNumberOfToday}}</td>

                        <td style="text-align: center">{{user.solvedQuestion}}</td>


                        <!--<td>-->
                        <!--<div ng-class="{HeartAnimation:true, 'like_active':liked }"-->
                        <!--ng-init="upvoteNumber = user.upvoteNumber; liked = false"-->
                        <!--ng-click="liked = !liked; upvote(user.username, upvoteNumber,$index)"></div>-->


                        <!--{{upvoteNumber}}-->
                        <!--</td>-->

                        <td ng-init="upvoteNumber = user.upvoteNumber ;user.isDisabled = false" style="text-align: center">

                            <button ng-disabled="{{isDisabled}}" class="fas fa-thumbs-up"
                                    ng-click="user.isDisabled ||upvote(user.username, upvoteNumber,$index);user.isDisabled ||( upvoteNumber = upvoteNumber+ 1); user.isDisabled = true;
                                "></button>
                            <span id="upvote_{{$index}}">
                    {{upvoteNumber}}
                    </span>
                        </td>


                    </tr>

                    </tbody>
                </table>


            </div>

        </div>

    </div>

</div>

